package com.lwq;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName
 * @Description
 * @Author liwq
 * @Date 2021/2/1 16:29
 * @Version 1.0
 */
@SpringBootApplication
public class RibbonLoadBalanceApplication {
    public static void main(String[] args) throws Exception {
        SpringApplication.run(RibbonLoadBalanceApplication.class, args);
    }

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
